home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / go / comp / readme < prev    next >
Encoding:
Text File  |  1991-06-05  |  5.7 KB  |  124 lines

  1. To understand this code you will want to read the following:
  2.  
  3.     "Machine Learning, Game Play and Go", David Stoutamire,
  4.     Tech. Report TR 91-128, Center for Automation and Intelligent
  5.     Systems Research, Case Western Reserve University,
  6.     Cleveland, Ohio 44106.
  7.  
  8. Abstract:
  9.  
  10.     The game of go is an ideal problem domain for exploring machine
  11.     learning: it is easy to define and there are many human experts,
  12.     yet existing programs have failed to emulate their level of play to
  13.     date.  Existing literature on go playing programs and applications
  14.     of machine learning to games are surveyed.  An error function based
  15.     on a database of master games is defined which is used to formulate
  16.     the learning of go as an optimization problem.  A classification
  17.     technique called {\em pattern preference} is presented which is
  18.     able to automatically derive patterns representative of good moves;
  19.     a hashing technique allows pattern preference to run efficiently on
  20.     conventional hardware with graceful degradation as memory size
  21.     decreases.
  22.  
  23. This is more or less a subset of my thesis:
  24.  
  25.     "Machine Learning Applied to Go", MS thesis,
  26.     David Stoutamire, Case Western Reserve University, 1991.
  27.  
  28. Postscript for the report is available from caisr2.caisr.cwru.edu
  29. [129.22.24.22] as pub/iku/report.ps.Z, in compressed form.  This is 90
  30. pages of text.  A photocopy can also be obtained by writing to the
  31. center and asking for report TR 91-128. 
  32.  
  33. This code requires g++ and libg++, available from prep.ai.mit.edu.
  34. It compiles successfully under 1.37 on Ultrix 2.2 on and SunOS 4.0.3.
  35. If your g++ and libg++ works, this should too.  Be aware that the
  36. definition of "allgames" in line 10 of iku.h will need to change
  37. if you are running in a different directory and don't want to have
  38. to specify the games on the command line.  The RandomInteger include
  39. file on line 25 of Opponent.cc changes in 1.39 to RndInt, I believe.
  40. I had it running under a crippled g++ under IRIX, for which there are
  41. some scattered #ifdef's.  Under 1.37 you may get a lot of bogus
  42. "warning: declaration of `$t' shadows a parameter" messages, ignore them.
  43. 1.39 had problems with bad handling of #pragmas in the genclass-created
  44. code, so watch out; you may have to take them out, if you don't have
  45. a release that fixes this bug.
  46.  
  47. A number of sample games in COSMOS format are included in the
  48. directory "games".  Other games in COSMOS or Ishi format can be
  49. placed in additional subdirectories - the default definition of
  50. "allgames" is "games/*/*", so it will find anything present.  For
  51. example, you can copy Go World On Disk games to subdirectories here.
  52. The games here are all taken from the net, and assumed to be PD.
  53.  
  54. This code is being made available in the spirit of good science and
  55. reproducible results (something rare in computer go).  I can answer
  56. questions about it, but I won't be supporting it, unless there is
  57. a lot of interest.  If you are just interested in the generic go support
  58. classes, check out the file util.cc and the definitions in iku.h.
  59. Liberties and group info are updated incrementally, so it is relatively
  60. fast (although the use of sets might slow things up a lot if you want
  61. it for something backtrack-intensive such as alpha-beta).
  62.  
  63. ------------------------------------------------------------------------
  64. Usage (in a sort-of BNF form):
  65.  
  66. <call to iku>::= iku <command> <command> <command>...
  67.  
  68. <command>::= play  <opponent> <opponent> <holding-file> // file to record game
  69.            | study <opponent> <games>
  70.            | abort            // turn on abortion on fatal error
  71.        | help            // show help file
  72.        | evalfile  -evalfile-    // record evaluations in COSMOS form
  73.        | postscriptdir  -dir-    // generate printable postscript of all
  74.        | nolearn            // turn off studying and just generate
  75.                     // evaluations (and report error)
  76.  
  77. <holding-file>::= nofile | -filename-   // use "nofile" to not use recording
  78.                     // options (such as during "play")
  79.  
  80. // "allgames" is defined in iku.h, and forever just keeps iterating
  81. <games>::= "-files-" | <allgames> | <forever>
  82.  
  83. <opponent>::= <meta> | curses | random | <map> | <hash > | greedy
  84. <meta>::= meta -num- <opponent> <opponent> <opponent>...
  85. <map>::=  <pattype> <holding-file>   
  86. <hash>::= <pattype> -hashsize- <holding-file>
  87. <pattype>::= nxn -radius-
  88.        | diamond -min-  -max-  -must-see-  -libscutoff-
  89.        | group -radius-
  90.  
  91. ---------------------------------------------------------------------
  92. Examples:
  93.  
  94.     iku study hash nxn 2 2000003 nofile allgames
  95.  
  96.     creates an opponent consisting of a hash table of 2000003 entries,
  97.     which records weights associated with patterns extracted on
  98.     a square 5x5 region surrounding each evaluated move.
  99.  
  100.     iku study hash diamond 2 5 2 0 2000003 checkpoint allgames
  101.  
  102.     creates a hash table opponent as above but using a diamond shaped
  103.     window of minimum radius 2 and maximum radius 5, stopping expansion
  104.     after seeing two stones.  Checkpointing to the file "checkpoint"
  105.     occurs after each studied game.  If the file did not previously
  106.     exist, a new opponent (all zero entries) will be created.  If the
  107.     file already exists, it will be loaded.
  108.  
  109.     iku study map diamond 2 5 2 0 nofile allgames
  110.  
  111.     Same as above but using a full map to store patterns instead of the
  112.     hash table.  "nofile" specifies no checkpoint file.  
  113.  
  114.     iku play curses hash diamond 2 5 2 0 2000003 checkpoint record
  115.  
  116.     allows the user to play the opponent saved in the file "checkpoint".
  117.     The game will be stored in the file "record" in COSMOS format.
  118.  
  119.     iku play curses meta 2 random hash diamond 2 5 2 0 2000003 checkpoint record
  120.  
  121.     same as above, but with a slight random component added to
  122.     randomize move selection.  A meta opponent sums the evals of
  123.     multiple other opponents.
  124.